



  @include('common.header')
    
  <div class="content col-xs-12 col-sm-10">
            <div class="banner">
                 <p class="fl"><a href="/land">土地信息</a> > 修改地块</p>
            </div>
          
            <div class="infoBox">
              <div class="info1">
    @if (count($errors) > 0)
    <div class="alert alert-danger">
        <ul>
            @foreach ($errors->all() as $error)
                <li>{{ $error }}</li>
            @endforeach
        </ul>
    </div>
  @endif
         <form action="{{ URL('land/update') }}" method="POST">
            <input type="hidden" name="_token" value="{{ csrf_token() }}">
            <input type="hidden" name="id" value="{{$land->id}}">
            <table>
            <tr>
              <td>所属合同</td>
              <td>
                <select type="text" name="contract_code" class="form-control" required="required">
                  
                @foreach ($contracts as $contract)
                  <option value="{{$contract->code}}">{{$contract->code}}</option>
                @endforeach  
              </select>
              </td>
            </tr> 

            <tr>
              <td>名称</td>
              <td><input type="text" name="name" value="{{$land->name}}" class="form-control" required="required"></td>
            </tr> 
   <tr>
              <td>类型</td>
              <td>
                <select type="text" name="catalog" class="form-control" required="required">
            <option value={{CATALOG_SHANDI1}}>一类山地</option>
            <option value={{CATALOG_SHANDI2}}>二类山地</option>
            <option value={{CATALOG_YUANDI}}>塬地</option>
          </select>
              </td>
            </tr> 

            <tr>
              <td>面积</td>
              <td><input type="text" name="area" value="{{$land->area}}" class="form-control" required="required"></td>
            </tr> 

            <tr>
              <td>单价(元）</td>
              <td><input type="text" name="price" value="{{$land->price}}" class="form-control" required="required"></td>
            </tr> 

            <tr>
              <td>位置</td>
              <td><input type="text" name="location" value="{{$land->location}}" class="form-control" ></td>
            </tr> 
          <tr>
              <td>备注</td>
              <td><input type="text" name="comment" value="{{$land->comment}}" class="form-control" ></td>
            </tr> 

       <tr>
              <td colspan=2><input type="submit" value="修改" class="add"/></td>
            </tr> 

          </table>
                  </form> 
                 
              </div>

            </div>
          
        </div>
      </div>
    </div>

    @include('common.footer')
  


